<div id="header">
    <img src="<?php echo base_url('img/logo.png');?>" alt="logo" class="logo" />
    <div class="top-right">
        <span id="date"></span>&nbsp;<span id="clock"></span>
        <div style="text-align: right; margin-top: 3px; font-style: italic;">
            <?php if (isset($userdata['username']))
                echo "Welcome, {$userdata['username']}"; ?>
        </div>
    </div>
</div>